/****************************************************************************
 * Copyright (C) 2025 Chenyz. All rights reserved.
 *
 * @file    TinyOS_Cpu.h
 *
 * @par     dependencies
 *          - stdint.h (Standard integer types)
 *
 * @author  Chenyz
 *
 * @brief   CPU and System Timing Management Header
 *          This file provides declarations for CPU-related functionality
 *          and system timing management in TinyOS, including:
 *          - System tick configuration and handling
 *          - CPU usage monitoring and statistics
 *          - System timing initialization and synchronization
 *          - Performance measurement utilities
 *
 * @version V1.0
 * @date    2025-10-03
 *
 * @note    This module provides core system timing and CPU management
 *          functions that are essential for task scheduling and system
 *          performance monitoring.
 ****************************************************************************/

#ifndef __TINYOS_CPU_H__
#define __TINYOS_CPU_H__

/******************************** Includes **********************************/
#include <stdint.h>

/*************************** Function Declarations **************************/

/* System tick management functions */
void TinyOS_TaskSystickHandler(void);
void TinyOS_SetSystickPeriod(uint32_t ms);

/* CPU usage monitoring functions */
void TinyOS_InitCpuUsageState(void);
void TinyOS_CpuUsageSyncWithSystick(void);
void TinyOS_TickCountInit(void);
float TinyOS_CpuUsageGet(void);

#endif /* __TINYOS_CPU_H__ */

